var path = require('path')
var webpack=require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports={
	entry: './src/index.js',
	output :{
		path: path.resolve(__dirname, './dist'),
		filename:'main.js'
	},
   //配置server
   devServer: {
		    historyApiFallback: true,
		    inline:true,
		    noInfo: true,
		    overlay: true
		  },
	
	plugins:[
		//生成html
		new HtmlWebpackPlugin({
			filename: 'index.html',
		    template: path.resolve(__dirname, './src/index.html'),
		    title:'title webpack from plugin'
		}),
	]
    
}
